package com.program.facesigninsystem.service.impl;

import com.program.facesigninsystem.dao.IFriendDao;
import com.program.facesigninsystem.entity.Friend;
import com.program.facesigninsystem.service.IFriendService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class FriendService implements IFriendService {
    @Autowired
    private IFriendDao iFriendDao;
    @Override
    public void insertFriend(String user_id, String friend_id) {
        iFriendDao.insertFriend(user_id, friend_id);
    }

    @Override
    public Friend selectExist(String user_id, String friend_id) {
        return iFriendDao.selectExist(user_id, friend_id);
    }

    @Override
    public List<Map<String, Object>> selectByOrder(String user_id) {
        return iFriendDao.selectByOrder(user_id);
    }

    @Override
    public List<Map<String, Object>> overallRanking() {
        return iFriendDao.overallRanking();
    }

    @Override
    public List<Map<String, Object>> scoreRank() {
        return iFriendDao.scoreRank();
    }
}
